
package com.example.demo.mybatis.service.impl;

import com.example.demo.mybatis.mapper.KwhMapper;

import com.example.demo.mybatis.model.PlcKwhPojo;
import com.example.demo.mybatis.service.KwhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KwhServiceImpl implements KwhService {

    @Autowired
    private KwhMapper kwhMapper;

    @Override
    public PlcKwhPojo getKwh(Long id) {
        return kwhMapper.getKwh(id);
    }

    @Override
    public List<PlcKwhPojo> getAllPlcKwh() {
        return kwhMapper.getAllPlcKwh();
    }

    @Override
    public List<PlcKwhPojo> findByCondition(PlcKwhPojo plcKwhPojo) {
        return kwhMapper.getAllPlcKwhByCondition(plcKwhPojo);
    }

    @Override
    public List<PlcKwhPojo> findByCondition2(PlcKwhPojo plcKwhPojo) {
        return kwhMapper.getAllPlcKwhByCondition2(plcKwhPojo);
    }
}
